home *** CD-ROM | disk | FTP | other *** search
- * Program.: PC_DATE.PRG
- * Author..: Tom Rettig
- * Date....: 12/29/83
- * Notice..: Copyright 1983, Ashton-Tate, All Rights Reserved.
- * Version.: dBASE II, version 2.4
- * Notes...: Sets the IBM-PC DOS system date from the dBASE II
- * system DATE().
- *
- * OUT: is:set True if DOS took the date.
- * False if not a valid DOS date.
- *
- * ---Parse the dBASE system date into memory variables.
- STORE VAL( $( DATE(), 1, 2 ) ) TO t:month
- STORE VAL( $( DATE(), 4, 2 ) ) TO t:day
- * ---The year is stored in two bytes, high order and low order.
- STORE INT( 1900 / 256 ) TO t:year:hi
- STORE VAL( $( DATE(), 7, 2 ) ) +;
- 1900 - INT( 1900 / 256 ) * 256 TO t:year:low
- *
- * ---Place the parsed date into memory where the
- * ---assembly routine can get to it.
- POKE 61453, t:day, t:month, t:year:low, t:year:hi
- *
- * ---Place the assembly routine into memory, and run it.
- POKE 61457, 139, 14, 15,240,139, 22, 13,240
- POKE 61465, 180, 43,205, 33,162, 33,240,195
- SET CALL TO 61457
- CALL
- *
- * ---Check to see if DOS accepted the date.
- STORE PEEK( 61473 ) = 0 TO is:set
- *
- RELEASE t:day, t:month, t:year:hi, t:year:low
- RETURN
- * EOF: PC_DATE.PRG